//
//  GoodTableViewController.m
//  11213
//
//  Created by student on 16/3/8.
//  Copyright © 2016年 niit. All rights reserved.
//

#import "GoodTableViewController.h"
#import "GoodsModel.h"
#import "GoodsCell.h"


@interface GoodTableViewController ()

@property(nonatomic,strong)NSArray *list;

@end

@implementation GoodTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.list=[GoodsModel goodsArr];
    NSLog(@"%@",self.list);

}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {

    return self.list.count;
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    GoodsCell *cell =[tableView dequeueReusableCellWithIdentifier:@"Cell"];
    GoodsModel *m=self.list[indexPath.row];
    cell.goods=m;

    
    return cell;
}



@end
